package com.itheima.list.增强for;

import java.util.ArrayList;

public class ZQforDemo1 {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        list.add("a");
        list.add("b");
        list.add("c");
        list.add("d");

        //list.fori
        for (int i = 0; i < list.size(); i++) {

        }
        //list.iter
        for (String s : list) {
            s="qq";
        }
        System.out.println(list);



        //直接iter回车
        for (String s2 : list) {
            s2 = "qwer";
            System.out.print(s2 + "  ");
        }

    }

}
